{% extends "space/rest/index.html" %}
{% block script %}
	
	
{% endblock %}
{% load pagination_tags %}
{% block right_container %}
<script type="text/javascript"> 

function deleteCuisType(id){
	if(confirm("删除该目录同时也会删除子目录和目录下的菜式，是否确定删除?")){
		window.location.href="/space/rest/cuis/"+id+"/del/";
	}
}
</script>
    <div class="admin_position">商户管理 > 菜式目录分类列表</div>
    
     <div class="admin_mer_zpc_ad" >
     <table class="zpc_ad_list"><tbody>
           <tr>
              <td colspan="4" class="admin_top_title">目录管理 <a href="add/">新增目录</a></td>
           </tr>
           
           <tr class="admin_title">
              <td>目录名称</td>
              <td>上级目录</td>
              <td>操作</td>
           </tr>
           {% autopaginate rest_cuis_types 10%}
           {% for rest_cuis_type in rest_cuis_types %}
           <tr>
              <td>                 
                	{{rest_cuis_type.name}}
              </td>
              <td>                 
                	{{rest_cuis_type.parent}}
              </td>               
              <td>                 
                <a href="{{rest_cuis_type.id}}/update/">编辑</a>
                <a href="#" onclick="deleteCuisType('{{rest_cuis_type.id}}')">删除</a>
              </td>   
          </tr>   
          {%endfor%}
          </tbody></table>
          {% paginate %}
          <span class="red3">（注：双击名称即可编辑修改）</span>
          
          </div>   
     
{% endblock %}
